package com.hzeport.bgs22emduty.inbound.api;

import com.hzeport.bgs22emduty.dto.HDMonthScheduleInfoVO;
import com.hzeport.bgs22emduty.service.DutyScheduleInfoService;
import com.hzeport.bgs22emduty.common.base.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@AllArgsConstructor
@RequestMapping("/screendutyInfols")
@Api(value = "screendutyInfols", tags = "值班人员列表政务网ls")
@Slf4j
@CrossOrigin
public class HBDataLSController {

    private final DutyScheduleInfoService dutyScheduleInfoService;

    @ApiOperation(value = "getTodaySchedule")
    @RequestMapping(value = "getTodaySchedule",method = RequestMethod.GET)
    public BaseResult<HDMonthScheduleInfoVO> getTodaySchedule() {
        return dutyScheduleInfoService.getTodaySchedule();
    }

    @ApiOperation(value = "getThisMonthSchedule")
    @RequestMapping(value = "getThisMonthSchedule",method = RequestMethod.GET)
    public BaseResult getThisMonthSchedule(@RequestParam("year")Integer year,@RequestParam("month")Integer month) {
        return dutyScheduleInfoService.getThisMonthSchedule(year,month);
    }
}
